home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-2.iso / Files II / Prog / B-C / CIconButton CDEF 1.0.sit / CIconButton CDEF 1.0 / Sample Code / CIconButton PDemo.p < prev    next >
MacBinary  |  1993-10-15  |  5.0 KB  |  [TEXT/PJMM]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: CIconButton PDemo.p

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert ZX81 Sinclair BASIC (image/sinclairBASIC) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert bsdiff patch (other/bsdiffPatch) ext Unsupported
1% dexvert imgdiff patch (other/imgdiffPatch) ext Unsupported
1% dexvert WSUS Patch Storage File (other/wsusPatchStorageFile) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Fri Oct 15 23:16:16 1993, modified Fri Oct 15 23:16:16 1993, creator Think Pascal, type ASCII, 4404 bytes "CIconButton PDemo.p" , at 0x11b4 402 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[PJMM]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 13 43 49 63 6f 6e 42 | 75 74 74 6f 6e 20 50 44 |..CIconB|utton PD|
|00000010| 65 6d 6f 2e 70 00 00 00 | 00 00 00 00 00 00 00 00 |emo.p...|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 50 4a 4d | 4d 00 00 00 00 00 00 00 |.TEXTPJM|M.......|
|00000050| 00 00 00 00 00 11 34 00 | 00 01 92 a8 e5 18 00 a8 |......4.|........|
|00000060| e5 18 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 5a cd 00 00 |........|....Z...|
|00000080| 50 52 4f 47 52 41 4d 20 | 53 61 6d 70 6c 65 3b 0d |PROGRAM |Sample;.|
|00000090| 7b 7d 0d 7b 09 53 61 6d | 70 6c 65 20 70 72 6f 67 |{}.{.Sam|ple prog|
|000000a0| 72 61 6d 20 66 6f 72 20 | 75 73 69 6e 67 20 74 68 |ram for |using th|
|000000b0| 65 20 43 49 63 6f 6e 42 | 75 74 74 6f 6e 20 43 44 |e CIconB|utton CD|
|000000c0| 45 46 20 31 2e 30 7d 0d | 7b 09 62 79 20 52 61 6d |EF 1.0}.|{.by Ram|
|000000d0| 6f 6e 20 4d 2e 20 46 65 | 6c 63 69 61 6e 6f 7d 0d |on M. Fe|lciano}.|
|000000e0| 7b 09 66 65 6c 63 69 61 | 6e 6f 40 63 61 6d 69 73 |{.felcia|no@camis|
|000000f0| 2e 73 74 61 6e 66 6f 72 | 64 2e 65 64 75 7d 0d 7b |.stanfor|d.edu}.{|
|00000100| 7d 0d 7b 09 a9 31 39 39 | 33 20 52 61 6d 6f 6e 20 |}.{..199|3 Ramon |
|00000110| 4d 2e 20 46 65 6c 63 69 | 61 6e 6f 2c 20 41 6c 6c |M. Felci|ano, All|
|00000120| 20 52 69 67 68 74 73 20 | 52 65 73 65 72 76 65 64 | Rights |Reserved|
|00000130| 7d 0d 7b 7d 0d 0d 09 55 | 53 45 53 0d 09 09 43 49 |}.{}...U|SES...CI|
|00000140| 63 6f 6e 42 75 74 74 6f | 6e 49 6e 74 66 3b 0d 0d |conButto|nIntf;..|
|00000150| 09 43 4f 4e 53 54 0d 09 | 09 6b 43 49 63 6f 6e 42 |.CONST..|.kCIconB|
|00000160| 75 74 74 6f 6e 43 44 45 | 46 49 44 20 3d 20 32 30 |uttonCDE|FID = 20|
|00000170| 3b 0d 0d 09 09 6b 53 61 | 6d 70 6c 65 4d 61 69 6e |;....kSa|mpleMain|
|00000180| 20 3d 20 36 35 30 3b 0d | 09 09 6b 53 61 6d 70 6c | = 650;.|..kSampl|
|00000190| 65 41 6c 74 20 3d 20 37 | 30 30 3b 0d 09 09 6b 53 |eAlt = 7|00;...kS|
|000001a0| 61 6d 70 6c 65 53 68 65 | 6c 6c 20 3d 20 33 32 31 |ampleShe|ll = 321|
|000001b0| 30 3b 0d 0d 09 09 61 74 | 4c 65 66 74 20 3d 20 24 |0;....at|Left = $|
|000001c0| 30 38 3b 0d 09 09 61 74 | 52 69 67 68 74 20 3d 20 |08;...at|Right = |
|000001d0| 24 30 43 3b 0d 09 09 61 | 74 54 6f 70 20 3d 20 24 |$0C;...a|tTop = $|
|000001e0| 30 32 3b 0d 09 09 61 74 | 42 6f 74 74 6f 6d 20 3d |02;...at|Bottom =|
|000001f0| 20 24 30 33 3b 0d 09 56 | 41 52 0d 09 09 62 50 75 | $03;..V|AR...bPu|
|00000200| 73 68 42 75 74 74 6f 6e | 3a 20 63 6f 6e 74 72 6f |shButton|: contro|
|00000210| 6c 48 61 6e 64 6c 65 3b | 0d 0d 0d 09 46 55 4e 43 |lHandle;|....FUNC|
|00000220| 54 49 4f 4e 20 47 65 74 | 52 61 6e 67 65 64 52 64 |TION Get|RangedRd|
|00000230| 6d 20 28 6d 69 6e 2c 20 | 6d 61 78 3a 20 69 6e 74 |m (min, |max: int|
|00000240| 65 67 65 72 29 3a 20 69 | 6e 74 65 67 65 72 3b 0d |eger): i|nteger;.|
|00000250| 09 09 56 41 52 0d 09 09 | 09 71 64 52 64 6d 3a 20 |..VAR...|.qdRdm: |
|00000260| 6c 6f 6e 67 69 6e 74 3b | 0d 09 09 09 72 61 6e 67 |longint;|....rang|
|00000270| 65 2c 20 74 3a 20 6c 6f | 6e 67 69 6e 74 3b 0d 09 |e, t: lo|ngint;..|
|00000280| 42 45 47 49 4e 0d 09 09 | 71 64 52 64 6d 20 3a 3d |BEGIN...|qdRdm :=|
|00000290| 20 42 41 4e 44 28 24 46 | 46 46 46 2c 20 72 61 6e | BAND($F|FFF, ran|
|000002a0| 64 6f 6d 29 3b 0d 09 09 | 72 61 6e 67 65 20 3a 3d |dom);...|range :=|
|000002b0| 20 6d 61 78 20 2d 20 6d | 69 6e 3b 0d 09 09 74 20 | max - m|in;...t |
|000002c0| 3a 3d 20 28 71 64 52 64 | 6d 20 2a 20 72 61 6e 67 |:= (qdRd|m * rang|
|000002d0| 65 29 20 44 49 56 20 36 | 35 35 33 36 3b 09 09 7b |e) DIV 6|5536;..{|
|000002e0| 6e 6f 77 20 30 20 3c 3d | 20 74 20 3c 3d 20 72 61 |now 0 <=| t <= ra|
|000002f0| 6e 67 65 7d 0d 09 09 47 | 65 74 52 61 6e 67 65 64 |nge}...G|etRanged|
|00000300| 52 64 6d 20 3a 3d 20 74 | 20 2b 20 6d 69 6e 3b 0d |Rdm := t| + min;.|
|00000310| 09 45 4e 44 3b 0d 0d 0d | 09 50 52 4f 43 45 44 55 |.END;...|.PROCEDU|
|00000320| 52 45 20 64 6f 43 6f 6e | 74 65 6e 74 43 6c 69 63 |RE doCon|tentClic|
|00000330| 6b 20 28 77 69 6e 64 6f | 77 3a 20 77 69 6e 64 6f |k (windo|w: windo|
|00000340| 77 50 74 72 3b 20 65 76 | 65 6e 74 3a 20 65 76 65 |wPtr; ev|ent: eve|
|00000350| 6e 74 52 65 63 6f 72 64 | 29 3b 0d 09 09 56 41 52 |ntRecord|);...VAR|
|00000360| 0d 09 09 09 6d 6f 75 73 | 65 3a 20 70 6f 69 6e 74 |....mous|e: point|
|00000370| 3b 0d 09 09 09 63 6f 6e | 74 72 6f 6c 3a 20 63 6f |;....con|trol: co|
|00000380| 6e 74 72 6f 6c 48 61 6e | 64 6c 65 3b 0d 09 09 09 |ntrolHan|dle;....|
|00000390| 63 68 65 63 6b 62 6f 78 | 2c 20 70 61 72 74 3a 20 |checkbox|, part: |
|000003a0| 69 6e 74 65 67 65 72 3b | 0d 09 42 45 47 49 4e 0d |integer;|..BEGIN.|
|000003b0| 09 09 73 65 74 50 6f 72 | 74 28 77 69 6e 64 6f 77 |..setPor|t(window|
|000003c0| 29 3b 0d 09 09 6d 6f 75 | 73 65 20 3a 3d 20 65 76 |);...mou|se := ev|
|000003d0| 65 6e 74 2e 77 68 65 72 | 65 3b 0d 09 09 67 6c 6f |ent.wher|e;...glo|
|000003e0| 62 61 6c 54 6f 4c 6f 63 | 61 6c 28 6d 6f 75 73 65 |balToLoc|al(mouse|
|000003f0| 29 3b 0d 09 09 70 61 72 | 74 20 3a 3d 20 66 69 6e |);...par|t := fin|
|00000400| 64 43 6f 6e 74 72 6f 6c | 28 6d 6f 75 73 65 2c 20 |dControl|(mouse, |
|00000410| 77 69 6e 64 6f 77 2c 20 | 63 6f 6e 74 72 6f 6c 29 |window, |control)|
|00000420| 3b 0d 09 09 49 46 20 28 | 28 70 61 72 74 20 3e 20 |;...IF (|(part > |
|00000430| 30 29 20 26 20 28 63 6f | 6e 74 72 6f 6c 20 3c 3e |0) & (co|ntrol <>|
|00000440| 20 4e 49 4c 29 29 20 54 | 48 45 4e 0d 09 09 09 49 | NIL)) T|HEN....I|
|00000450| 46 20 74 72 61 63 6b 43 | 6f 6e 74 72 6f 6c 28 63 |F trackC|ontrol(c|
|00000460| 6f 6e 74 72 6f 6c 2c 20 | 6d 6f 75 73 65 2c 20 4e |ontrol, |mouse, N|
|00000470| 49 4c 29 20 3c 3e 20 30 | 20 54 48 45 4e 0d 09 09 |IL) <> 0| THEN...|
|00000480| 09 09 42 45 47 49 4e 0d | 09 09 09 09 09 63 68 65 |..BEGIN.|.....che|
|00000490| 63 6b 42 6f 78 20 3a 3d | 20 47 65 74 43 74 6c 56 |ckBox :=| GetCtlV|
|000004a0| 61 6c 75 65 28 63 6f 6e | 74 72 6f 6c 29 3b 0d 09 |alue(con|trol);..|
|000004b0| 09 09 09 09 63 68 65 63 | 6b 42 6f 78 20 3a 3d 20 |....chec|kBox := |
|000004c0| 31 20 2d 20 63 68 65 63 | 6b 62 6f 78 3b 0d 09 09 |1 - chec|kbox;...|
|000004d0| 09 09 09 53 65 74 43 74 | 6c 56 61 6c 75 65 28 63 |...SetCt|lValue(c|
|000004e0| 6f 6e 74 72 6f 6c 2c 20 | 63 68 65 63 6b 62 6f 78 |ontrol, |checkbox|
|000004f0| 29 3b 0d 09 09 09 09 09 | 43 41 53 45 20 28 47 65 |);......|CASE (Ge|
|00000500| 74 52 61 6e 67 65 64 52 | 64 6d 28 31 2c 20 35 29 |tRangedR|dm(1, 5)|
|00000510| 29 20 4f 46 0d 09 09 09 | 09 09 09 31 3a 20 0d 09 |) OF....|...1: ..|
|00000520| 09 09 09 09 09 09 43 49 | 42 5f 53 65 74 54 69 74 |......CI|B_SetTit|
|00000530| 6c 65 4f 72 69 65 6e 74 | 61 74 69 6f 6e 28 63 6f |leOrient|ation(co|
|00000540| 6e 74 72 6f 6c 2c 20 61 | 74 4c 65 66 74 29 3b 0d |ntrol, a|tLeft);.|
|00000550| 09 09 09 09 09 09 32 3a | 20 0d 09 09 09 09 09 09 |......2:| .......|
|00000560| 09 43 49 42 5f 53 65 74 | 54 69 74 6c 65 4f 72 69 |.CIB_Set|TitleOri|
|00000570| 65 6e 74 61 74 69 6f 6e | 28 63 6f 6e 74 72 6f 6c |entation|(control|
|00000580| 2c 20 61 74 52 69 67 68 | 74 29 3b 0d 09 09 09 09 |, atRigh|t);.....|
|00000590| 09 09 33 3a 20 0d 09 09 | 09 09 09 09 09 43 49 42 |..3: ...|.....CIB|
|000005a0| 5f 53 65 74 54 69 74 6c | 65 4f 72 69 65 6e 74 61 |_SetTitl|eOrienta|
|000005b0| 74 69 6f 6e 28 63 6f 6e | 74 72 6f 6c 2c 20 61 74 |tion(con|trol, at|
|000005c0| 54 6f 70 29 3b 0d 09 09 | 09 09 09 09 34 3a 20 0d |Top);...|....4: .|
|000005d0| 09 09 09 09 09 09 09 43 | 49 42 5f 53 65 74 54 69 |.......C|IB_SetTi|
|000005e0| 74 6c 65 4f 72 69 65 6e | 74 61 74 69 6f 6e 28 63 |tleOrien|tation(c|
|000005f0| 6f 6e 74 72 6f 6c 2c 20 | 61 74 42 6f 74 74 6f 6d |ontrol, |atBottom|
|00000600| 29 3b 0d 09 09 09 09 09 | 09 4f 54 48 45 52 57 49 |);......|.OTHERWI|
|00000610| 53 45 0d 09 09 09 09 09 | 09 09 42 45 47 49 4e 0d |SE......|..BEGIN.|
|00000620| 09 09 09 09 09 09 09 45 | 4e 44 3b 0d 09 09 09 09 |.......E|ND;.....|
|00000630| 09 45 4e 44 3b 0d 09 09 | 09 09 09 69 6e 76 61 6c |.END;...|...inval|
|00000640| 52 65 63 74 28 63 6f 6e | 74 72 6f 6c 5e 5e 2e 63 |Rect(con|trol^^.c|
|00000650| 6f 6e 74 72 6c 52 65 63 | 74 29 3b 0d 09 09 09 09 |ontrlRec|t);.....|
|00000660| 45 4e 44 3b 0d 09 45 4e | 44 3b 0d 0d 09 50 52 4f |END;..EN|D;...PRO|
|00000670| 43 45 44 55 52 45 20 44 | 72 61 77 4d 79 57 69 6e |CEDURE D|rawMyWin|
|00000680| 64 6f 77 20 28 77 68 69 | 63 68 57 69 6e 64 6f 77 |dow (whi|chWindow|
|00000690| 3a 20 77 69 6e 64 6f 77 | 50 74 72 3b 20 62 74 6e |: window|Ptr; btn|
|000006a0| 3a 20 63 6f 6e 74 72 6f | 6c 48 61 6e 64 6c 65 29 |: contro|lHandle)|
|000006b0| 3b 0d 09 09 56 41 52 0d | 09 09 09 74 65 78 74 52 |;...VAR.|...textR|
|000006c0| 65 63 74 3a 20 72 65 63 | 74 3b 0d 09 09 09 74 68 |ect: rec|t;....th|
|000006d0| 65 43 6f 70 79 72 69 67 | 68 74 3a 20 73 74 72 32 |eCopyrig|ht: str2|
|000006e0| 35 35 3b 0d 09 42 45 47 | 49 4e 0d 09 09 46 69 6c |55;..BEG|IN...Fil|
|000006f0| 6c 52 65 63 74 28 77 68 | 69 63 68 57 69 6e 64 6f |lRect(wh|ichWindo|
|00000700| 77 5e 2e 70 6f 72 74 52 | 65 63 74 2c 20 67 72 61 |w^.portR|ect, gra|
|00000710| 79 29 3b 0d 0d 09 09 74 | 65 78 74 52 65 63 74 20 |y);....t|extRect |
|00000720| 3a 3d 20 77 68 69 63 68 | 57 69 6e 64 6f 77 5e 2e |:= which|Window^.|
|00000730| 70 6f 72 74 52 65 63 74 | 3b 0d 09 09 49 6e 73 65 |portRect|;...Inse|
|00000740| 74 52 65 63 74 28 74 65 | 78 74 52 65 63 74 2c 20 |tRect(te|xtRect, |
|00000750| 35 2c 20 35 29 3b 0d 09 | 09 74 65 78 74 52 65 63 |5, 5);..|.textRec|
|00000760| 74 2e 62 6f 74 74 6f 6d | 20 3a 3d 20 74 65 78 74 |t.bottom| := text|
|00000770| 52 65 63 74 2e 74 6f 70 | 20 2b 20 34 34 3b 0d 09 |Rect.top| + 44;..|
|00000780| 09 46 69 6c 6c 52 65 63 | 74 28 74 65 78 74 52 65 |.FillRec|t(textRe|
|00000790| 63 74 2c 20 77 68 69 74 | 65 29 3b 0d 09 09 46 72 |ct, whit|e);...Fr|
|000007a0| 61 6d 65 52 65 63 74 28 | 74 65 78 74 52 65 63 74 |ameRect(|textRect|
|000007b0| 29 3b 0d 0d 09 09 74 68 | 65 43 6f 70 79 72 69 67 |);....th|eCopyrig|
|000007c0| 68 74 20 3a 3d 20 43 49 | 42 5f 47 65 74 43 6f 70 |ht := CI|B_GetCop|
|000007d0| 79 72 69 67 68 74 28 62 | 74 6e 29 3b 0d 09 09 4d |yright(b|tn);...M|
|000007e0| 6f 76 65 54 6f 28 31 32 | 2c 20 31 38 29 3b 0d 09 |oveTo(12|, 18);..|
|000007f0| 09 44 72 61 77 53 74 72 | 69 6e 67 28 74 68 65 43 |.DrawStr|ing(theC|
|00000800| 6f 70 79 72 69 67 68 74 | 29 3b 0d 0d 09 09 4d 6f |opyright|);....Mo|
|00000810| 76 65 54 6f 28 31 32 2c | 20 33 30 29 3b 0d 09 09 |veTo(12,| 30);...|
|00000820| 44 72 61 77 53 74 72 69 | 6e 67 28 27 43 6c 69 63 |DrawStri|ng('Clic|
|00000830| 6b 20 6f 6e 20 74 68 65 | 20 62 75 74 74 6f 6e 20 |k on the| button |
|00000840| 74 6f 20 72 61 6e 64 6f | 6d 6c 79 20 63 68 61 6e |to rando|mly chan|
|00000850| 67 65 20 74 68 65 20 74 | 69 74 6c 65 20 6f 72 69 |ge the t|itle ori|
|00000860| 65 6e 74 61 74 69 6f 6e | 2e 27 29 3b 0d 0d 09 09 |entation|.');....|
|00000870| 4d 6f 76 65 54 6f 28 31 | 32 2c 20 34 32 29 3b 0d |MoveTo(1|2, 42);.|
|00000880| 09 09 44 72 61 77 53 74 | 72 69 6e 67 28 27 43 6c |..DrawSt|ring('Cl|
|00000890| 69 63 6b 20 74 68 65 20 | 63 6c 6f 73 65 20 62 6f |ick the |close bo|
|000008a0| 78 20 6f 72 20 68 69 74 | 20 61 6e 79 20 6b 65 79 |x or hit| any key|
|000008b0| 20 74 6f 20 71 75 69 74 | 2e 27 29 3b 0d 0d 09 09 | to quit|.');....|
|000008c0| 55 70 64 61 74 65 43 6f | 6e 74 72 6f 6c 73 28 77 |UpdateCo|ntrols(w|
|000008d0| 68 69 63 68 57 69 6e 64 | 6f 77 2c 20 77 68 69 63 |hichWind|ow, whic|
|000008e0| 68 57 69 6e 64 6f 77 5e | 2e 76 69 73 52 67 6e 29 |hWindow^|.visRgn)|
|000008f0| 3b 0d 09 45 4e 44 3b 0d | 0d 0d 09 50 52 4f 43 45 |;..END;.|...PROCE|
|00000900| 44 55 52 45 20 64 6f 53 | 69 6d 70 6c 65 57 69 6e |DURE doS|impleWin|
|00000910| 64 6f 77 3b 0d 09 09 4c | 41 42 45 4c 0d 09 09 09 |dow;...L|ABEL....|
|00000920| 39 39 3b 0d 09 09 56 41 | 52 0d 09 09 09 64 6f 6e |99;...VA|R....don|
|00000930| 65 3a 20 62 6f 6f 6c 65 | 61 6e 3b 0d 09 09 09 74 |e: boole|an;....t|
|00000940| 68 65 57 69 6e 64 6f 77 | 3a 20 77 69 6e 64 6f 77 |heWindow|: window|
|00000950| 50 74 72 3b 0d 09 09 09 | 77 69 6e 64 6f 77 50 61 |Ptr;....|windowPa|
|00000960| 72 74 3a 20 69 6e 74 65 | 67 65 72 3b 0d 09 09 09 |rt: inte|ger;....|
|00000970| 77 52 65 63 6f 72 64 3a | 20 43 57 69 6e 64 6f 77 |wRecord:| CWindow|
|00000980| 52 65 63 6f 72 64 3b 0d | 09 09 09 6c 69 6d 69 74 |Record;.|...limit|
|00000990| 52 65 63 74 3a 20 72 65 | 63 74 3b 0d 09 09 09 72 |Rect: re|ct;....r|
|000009a0| 57 69 6e 64 6f 77 3a 20 | 72 65 63 74 3b 0d 0d 09 |Window: |rect;...|
|000009b0| 09 09 69 74 65 6d 42 6f | 78 3a 20 72 65 63 74 3b |..itemBo|x: rect;|
|000009c0| 0d 0d 09 09 09 74 68 65 | 45 76 65 6e 74 3a 20 65 |.....the|Event: e|
|000009d0| 76 65 6e 74 52 65 63 6f | 72 64 3b 0d 09 09 09 6e |ventReco|rd;....n|
|000009e0| 65 77 57 69 6e 64 6f 77 | 4c 6f 63 3a 20 70 6f 69 |ewWindow|Loc: poi|
|000009f0| 6e 74 3b 0d 09 09 09 73 | 61 76 65 50 6f 72 74 3a |nt;....s|avePort:|
|00000a00| 20 67 72 61 66 50 74 72 | 3b 0d 09 09 09 77 68 69 | grafPtr|;....whi|
|00000a10| 63 68 57 69 6e 64 6f 77 | 3a 20 77 69 6e 64 6f 77 |chWindow|: window|
|00000a20| 50 74 72 3b 0d 09 09 09 | 74 65 6d 70 43 6c 69 70 |Ptr;....|tempClip|
|00000a30| 3a 20 72 67 6e 48 61 6e | 64 6c 65 3b 0d 09 09 09 |: rgnHan|dle;....|
|00000a40| 6f 65 3a 20 6f 73 45 72 | 72 3b 0d 09 42 45 47 49 |oe: osEr|r;..BEGI|
|00000a50| 4e 0d 09 09 62 50 75 73 | 68 42 75 74 74 6f 6e 20 |N...bPus|hButton |
|00000a60| 3a 3d 20 4e 49 4c 3b 0d | 09 09 64 6f 6e 65 20 3a |:= NIL;.|..done :|
|00000a70| 3d 20 66 61 6c 73 65 3b | 0d 09 09 74 68 65 57 69 |= false;|...theWi|
|00000a80| 6e 64 6f 77 20 3a 3d 20 | 4e 49 4c 3b 0d 09 09 73 |ndow := |NIL;...s|
|00000a90| 65 74 52 65 63 74 28 72 | 57 69 6e 64 6f 77 2c 20 |etRect(r|Window, |
|00000aa0| 35 30 2c 20 35 30 2c 20 | 34 35 30 2c 20 32 30 30 |50, 50, |450, 200|
|00000ab0| 29 3b 0d 09 09 73 65 74 | 52 65 63 74 28 69 74 65 |);...set|Rect(ite|
|00000ac0| 6d 42 6f 78 2c 20 35 30 | 2c 20 35 30 2c 20 31 38 |mBox, 50|, 50, 18|
|00000ad0| 30 2c 20 31 32 30 29 3b | 0d 09 09 6c 69 6d 69 74 |0, 120);|...limit|
|00000ae0| 52 65 63 74 20 3a 3d 20 | 73 63 72 65 65 6e 42 69 |Rect := |screenBi|
|00000af0| 74 73 2e 62 6f 75 6e 64 | 73 3b 0d 09 09 74 68 65 |ts.bound|s;...the|
|00000b00| 57 69 6e 64 6f 77 20 3a | 3d 20 4e 65 77 43 57 69 |Window :|= NewCWi|
|00000b10| 6e 64 6f 77 28 40 77 52 | 65 63 6f 72 64 2c 20 72 |ndow(@wR|ecord, r|
|00000b20| 57 69 6e 64 6f 77 2c 20 | 27 43 49 63 6f 6e 42 75 |Window, |'CIconBu|
|00000b30| 74 74 6f 6e 20 64 65 6d | 6f 27 2c 20 74 72 75 65 |tton dem|o', true|
|00000b40| 2c 20 64 6f 63 75 6d 65 | 6e 74 50 72 6f 63 2c 20 |, docume|ntProc, |
|00000b50| 77 69 6e 64 6f 77 50 74 | 72 28 2d 31 29 2c 20 74 |windowPt|r(-1), t|
|00000b60| 72 75 65 2c 20 30 29 3b | 0d 09 09 49 46 20 74 68 |rue, 0);|...IF th|
|00000b70| 65 57 69 6e 64 6f 77 20 | 3d 20 4e 49 4c 20 54 48 |eWindow |= NIL TH|
|00000b80| 45 4e 0d 09 09 09 47 4f | 54 4f 20 39 39 3b 0d 09 |EN....GO|TO 99;..|
|00000b90| 09 53 65 74 50 6f 72 74 | 28 74 68 65 57 69 6e 64 |.SetPort|(theWind|
|00000ba0| 6f 77 29 3b 0d 09 09 50 | 65 6e 4e 6f 72 6d 61 6c |ow);...P|enNormal|
|00000bb0| 3b 0d 09 09 54 65 78 74 | 46 6f 6e 74 28 67 65 6e |;...Text|Font(gen|
|00000bc0| 65 76 61 29 3b 0d 09 09 | 54 65 78 74 53 69 7a 65 |eva);...|TextSize|
|00000bd0| 28 39 29 3b 0d 09 09 62 | 61 63 6b 50 61 74 28 67 |(9);...b|ackPat(g|
|00000be0| 72 61 79 29 3b 0d 0d 09 | 09 53 68 6f 77 57 69 6e |ray);...|.ShowWin|
|00000bf0| 64 6f 77 28 74 68 65 57 | 69 6e 64 6f 77 29 3b 0d |dow(theW|indow);.|
|00000c00| 09 09 62 50 75 73 68 62 | 75 74 74 6f 6e 20 3a 3d |..bPushb|utton :=|
|00000c10| 20 6e 65 77 43 6f 6e 74 | 72 6f 6c 28 74 68 65 57 | newCont|rol(theW|
|00000c20| 69 6e 64 6f 77 2c 20 69 | 74 65 6d 42 6f 78 2c 20 |indow, i|temBox, |
|00000c30| 27 54 65 73 74 69 6e 67 | 27 2c 20 66 61 6c 73 65 |'Testing|', false|
|00000c40| 2c 20 6b 53 61 6d 70 6c | 65 41 6c 74 2c 20 6b 53 |, kSampl|eAlt, kS|
|00000c50| 61 6d 70 6c 65 4d 61 69 | 6e 2c 20 6b 53 61 6d 70 |ampleMai|n, kSamp|
|00000c60| 6c 65 53 68 65 6c 6c 2c | 20 28 31 36 20 2a 20 6b |leShell,| (16 * k|
|00000c70| 43 49 63 6f 6e 42 75 74 | 74 6f 6e 43 44 45 46 49 |CIconBut|tonCDEFI|
|00000c80| 44 29 2c 20 6c 6f 6e 67 | 69 6e 74 28 4e 49 4c 29 |D), long|int(NIL)|
|00000c90| 29 3b 0d 09 09 53 68 6f | 77 43 6f 6e 74 72 6f 6c |);...Sho|wControl|
|00000ca0| 28 62 50 75 73 68 62 75 | 74 74 6f 6e 29 3b 0d 09 |(bPushbu|tton);..|
|00000cb0| 09 44 72 61 77 4d 79 57 | 69 6e 64 6f 77 28 74 68 |.DrawMyW|indow(th|
|00000cc0| 65 57 69 6e 64 6f 77 2c | 20 62 50 75 73 68 42 75 |eWindow,| bPushBu|
|00000cd0| 74 74 6f 6e 29 3b 0d 0d | 0d 09 09 52 45 50 45 41 |tton);..|...REPEA|
|00000ce0| 54 0d 09 09 09 49 46 20 | 57 61 69 74 4e 65 78 74 |T....IF |WaitNext|
|00000cf0| 45 76 65 6e 74 28 65 76 | 65 72 79 45 76 65 6e 74 |Event(ev|eryEvent|
|00000d00| 2c 20 74 68 65 45 76 65 | 6e 74 2c 20 30 2c 20 4e |, theEve|nt, 0, N|
|00000d10| 49 4c 29 20 54 48 45 4e | 0d 09 09 09 09 43 41 53 |IL) THEN|.....CAS|
|00000d20| 45 20 74 68 65 45 76 65 | 6e 74 2e 77 68 61 74 20 |E theEve|nt.what |
|00000d30| 4f 46 0d 09 09 09 09 09 | 6b 65 79 44 6f 77 6e 3a |OF......|keyDown:|
|00000d40| 20 0d 09 09 09 09 09 09 | 64 6f 6e 65 20 3a 3d 20 | .......|done := |
|00000d50| 74 72 75 65 3b 0d 09 09 | 09 09 09 6d 6f 75 73 65 |true;...|...mouse|
|00000d60| 44 6f 77 6e 3a 20 0d 09 | 09 09 09 09 09 42 45 47 |Down: ..|.....BEG|
|00000d70| 49 4e 0d 09 09 09 09 09 | 09 09 77 69 6e 64 6f 77 |IN......|..window|
|00000d80| 50 61 72 74 20 3a 3d 20 | 46 69 6e 64 57 69 6e 64 |Part := |FindWind|
|00000d90| 6f 77 28 74 68 65 45 76 | 65 6e 74 2e 77 68 65 72 |ow(theEv|ent.wher|
|00000da0| 65 2c 20 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 09 |e, theWi|ndow);..|
|00000db0| 09 09 09 09 09 09 43 41 | 53 45 20 77 69 6e 64 6f |......CA|SE windo|
|00000dc0| 77 50 61 72 74 20 4f 46 | 0d 09 09 09 09 09 09 09 |wPart OF|........|
|00000dd0| 09 69 6e 44 72 61 67 3a | 20 0d 09 09 09 09 09 09 |.inDrag:| .......|
|00000de0| 09 09 09 42 45 47 49 4e | 0d 09 09 09 09 09 09 09 |...BEGIN|........|
|00000df0| 09 09 09 44 72 61 67 57 | 69 6e 64 6f 77 28 74 68 |...DragW|indow(th|
|00000e00| 65 57 69 6e 64 6f 77 2c | 20 74 68 65 45 76 65 6e |eWindow,| theEven|
|00000e10| 74 2e 77 68 65 72 65 2c | 20 6c 69 6d 69 74 52 65 |t.where,| limitRe|
|00000e20| 63 74 29 3b 0d 09 09 09 | 09 09 09 09 09 09 09 6e |ct);....|.......n|
|00000e30| 65 77 57 69 6e 64 6f 77 | 4c 6f 63 20 3a 3d 20 74 |ewWindow|Loc := t|
|00000e40| 68 65 57 69 6e 64 6f 77 | 5e 2e 70 6f 72 74 52 65 |heWindow|^.portRe|
|00000e50| 63 74 2e 74 6f 70 4c 65 | 66 74 3b 0d 09 09 09 09 |ct.topLe|ft;.....|
|00000e60| 09 09 09 09 09 09 6c 6f | 63 61 6c 54 6f 47 6c 6f |......lo|calToGlo|
|00000e70| 62 61 6c 28 6e 65 77 57 | 69 6e 64 6f 77 4c 6f 63 |bal(newW|indowLoc|
|00000e80| 29 3b 0d 09 09 09 09 09 | 09 09 09 09 09 49 46 20 |);......|.....IF |
|00000e90| 6e 65 77 57 69 6e 64 6f | 77 4c 6f 63 2e 68 20 4d |newWindo|wLoc.h M|
|00000ea0| 4f 44 20 38 20 3c 3e 20 | 30 20 54 48 45 4e 0d 09 |OD 8 <> |0 THEN..|
|00000eb0| 09 09 09 09 09 09 09 09 | 09 09 4d 6f 76 65 57 69 |........|..MoveWi|
|00000ec0| 6e 64 6f 77 28 74 68 65 | 57 69 6e 64 6f 77 2c 20 |ndow(the|Window, |
|00000ed0| 28 6e 65 77 57 69 6e 64 | 6f 77 4c 6f 63 2e 68 20 |(newWind|owLoc.h |
|00000ee0| 44 49 56 20 38 29 20 2a | 20 38 2c 20 6e 65 77 57 |DIV 8) *| 8, newW|
|00000ef0| 69 6e 64 6f 77 4c 6f 63 | 2e 76 2c 20 74 72 75 65 |indowLoc|.v, true|
|00000f00| 29 3b 0d 09 09 09 09 09 | 09 09 09 09 45 4e 44 3b |);......|....END;|
|00000f10| 0d 09 09 09 09 09 09 09 | 09 69 6e 47 6f 41 77 61 |........|.inGoAwa|
|00000f20| 79 3a 20 0d 09 09 09 09 | 09 09 09 09 09 64 6f 6e |y: .....|.....don|
|00000f30| 65 20 3a 3d 20 54 72 61 | 63 6b 47 6f 41 77 61 79 |e := Tra|ckGoAway|
|00000f40| 28 74 68 65 57 69 6e 64 | 6f 77 2c 20 74 68 65 45 |(theWind|ow, theE|
|00000f50| 76 65 6e 74 2e 77 68 65 | 72 65 29 3b 0d 09 09 09 |vent.whe|re);....|
|00000f60| 09 09 09 09 09 69 6e 43 | 6f 6e 74 65 6e 74 3a 20 |.....inC|ontent: |
|00000f70| 0d 09 09 09 09 09 09 09 | 09 09 64 6f 43 6f 6e 74 |........|..doCont|
|00000f80| 65 6e 74 43 6c 69 63 6b | 28 74 68 65 57 69 6e 64 |entClick|(theWind|
|00000f90| 6f 77 2c 20 74 68 65 45 | 76 65 6e 74 29 3b 0d 09 |ow, theE|vent);..|
|00000fa0| 09 09 09 09 09 09 09 4f | 54 48 45 52 57 49 53 45 |.......O|THERWISE|
|00000fb0| 0d 09 09 09 09 09 09 09 | 09 09 42 45 47 49 4e 0d |........|..BEGIN.|
|00000fc0| 09 09 09 09 09 09 09 09 | 09 45 4e 44 3b 0d 09 09 |........|.END;...|
|00000fd0| 09 09 09 09 09 45 4e 44 | 3b 0d 09 09 09 09 09 09 |.....END|;.......|
|00000fe0| 45 4e 44 3b 0d 09 09 09 | 09 09 75 70 64 61 74 65 |END;....|..update|
|00000ff0| 45 76 74 3a 20 0d 09 09 | 09 09 09 09 42 45 47 49 |Evt: ...|....BEGI|
|00001000| 4e 0d 09 09 09 09 09 09 | 09 47 65 74 50 6f 72 74 |N.......|.GetPort|
|00001010| 28 73 61 76 65 50 6f 72 | 74 29 3b 0d 09 09 09 09 |(savePor|t);.....|
|00001020| 09 09 09 77 68 69 63 68 | 57 69 6e 64 6f 77 20 3a |...which|Window :|
|00001030| 3d 20 77 69 6e 64 6f 77 | 50 74 72 28 74 68 65 45 |= window|Ptr(theE|
|00001040| 76 65 6e 74 2e 6d 65 73 | 73 61 67 65 29 3b 0d 09 |vent.mes|sage);..|
|00001050| 09 09 09 09 09 09 42 65 | 67 69 6e 55 70 64 61 74 |......Be|ginUpdat|
|00001060| 65 28 77 68 69 63 68 57 | 69 6e 64 6f 77 29 3b 0d |e(whichW|indow);.|
|00001070| 09 09 09 09 09 09 09 44 | 72 61 77 4d 79 57 69 6e |.......D|rawMyWin|
|00001080| 64 6f 77 28 74 68 65 57 | 69 6e 64 6f 77 2c 20 62 |dow(theW|indow, b|
|00001090| 50 75 73 68 42 75 74 74 | 6f 6e 29 3b 0d 09 09 09 |PushButt|on);....|
|000010a0| 09 09 09 09 55 70 64 61 | 74 65 43 6f 6e 74 72 6f |....Upda|teContro|
|000010b0| 6c 73 28 77 68 69 63 68 | 57 69 6e 64 6f 77 2c 20 |ls(which|Window, |
|000010c0| 77 68 69 63 68 57 69 6e | 64 6f 77 5e 2e 76 69 73 |whichWin|dow^.vis|
|000010d0| 52 67 6e 29 3b 0d 09 09 | 09 09 09 09 09 45 6e 64 |Rgn);...|.....End|
|000010e0| 55 70 64 61 74 65 28 77 | 68 69 63 68 57 69 6e 64 |Update(w|hichWind|
|000010f0| 6f 77 29 3b 0d 09 09 09 | 09 09 09 09 53 65 74 50 |ow);....|....SetP|
|00001100| 6f 72 74 28 73 61 76 65 | 50 6f 72 74 29 3b 0d 09 |ort(save|Port);..|
|00001110| 09 09 09 09 09 45 4e 44 | 3b 0d 09 09 09 09 09 4f |.....END|;......O|
|00001120| 54 48 45 52 57 49 53 45 | 0d 09 09 09 09 09 09 3b |THERWISE|.......;|
|00001130| 0d 09 09 09 09 45 4e 44 | 3b 0d 09 09 55 4e 54 49 |.....END|;...UNTI|
|00001140| 4c 20 44 6f 6e 65 3b 0d | 39 39 3a 0d 09 09 49 46 |L Done;.|99:...IF|
|00001150| 20 74 68 65 57 69 6e 64 | 6f 77 20 3c 3e 20 4e 49 | theWind|ow <> NI|
|00001160| 4c 20 54 48 45 4e 0d 09 | 09 09 63 6c 6f 73 65 57 |L THEN..|..closeW|
|00001170| 69 6e 64 6f 77 28 74 68 | 65 57 69 6e 64 6f 77 29 |indow(th|eWindow)|
|00001180| 3b 0d 09 45 4e 44 3b 0d | 0d 0d 0d 42 45 47 49 4e |;..END;.|...BEGIN|
|00001190| 0d 09 49 6e 69 74 43 75 | 72 73 6f 72 3b 0d 0d 09 |..InitCu|rsor;...|
|000011a0| 64 6f 53 69 6d 70 6c 65 | 57 69 6e 64 6f 77 3b 0d |doSimple|Window;.|
|000011b0| 45 4e 44 2e 00 00 00 00 | 00 00 00 00 00 00 00 00 |END.....|........|
|000011c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001200| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 46 |.......L|...L...F|
|00001210| 00 00 00 7c 09 54 6f 6f | 6c 65 74 74 65 73 01 00 |...|.Too|lettes..|
|00001220| 00 00 00 17 00 00 1d a9 | a8 86 ca 3e a8 91 16 fe |........|...>....|
|00001230| 13 43 49 63 6f 6e 42 75 | 74 74 6f 6e 20 50 44 65 |.CIconBu|tton PDe|
|00001240| 6d 6f 2e 70 02 00 00 00 | 50 61 72 74 53 49 54 78 |mo.p....|PartSITx|
|00001250| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|00001260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001270| 00 00 a9 80 17 02 00 00 | 00 00 00 00 01 92 02 c8 |........|........|
|00001280| 00 00 00 01 30 9f 00 00 | 00 00 00 00 00 00 00 00 |....0...|........|
|00001290| 00 00 00 00 02 3b 00 00 | 1a 00 a7 6f 67 25 a7 6f |.....;..|...og%.o|
|000012a0| 67 37 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |g7......|........|
|000012b0| 00 00 00 01 8c 0b 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012c0| 00 00 00 00 4e 67 00 01 | 00 00 00 00 00 00 00 00 |....Ng..|........|
|000012d0| 00 00 00 00 08 00 00 00 | 00 7c 02 54 52 49 02 00 |........|.|.TRI..|
|000012e0| 00 00 61 64 72 70 44 61 | 6e 52 81 02 02 ac 03 08 |..adrpDa|nR......|
|000012f0| 00 00 00 02 fe 13 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001300| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00001310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001320| 00 00 00 00 00 00 00 06 | 00 04 00 2e 01 4f 02 d5 |........|.....O..|
|00001330| 03 fb 00 2e 01 4f 02 d5 | 03 fb a8 91 7a 10 00 00 |.....O..|....z...|
|00001340| 00 bf 00 00 00 ff 00 00 | 00 00 01 00 00 00 01 00 |........|........|
|00001350| 00 00 01 4c 00 00 00 4c | 00 00 00 46 00 72 35 4c |...L...L|...F.r5L|
|00001360| 1f 38 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.8.....2|..MPSR..|
|00001370| 00 0a 03 ed 00 00 00 00 | 00 00 00 72 33 d0 13 43 |........|...r3..C|
|00001380| 72 65 61 74 65 64 20 62 | 79 20 43 4d 61 73 74 65 |reated b|y CMaste|
|00001390| 72 aa 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |r.......|........|
|000013a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+